package com.android.BluethootChess.activity;


import com.android.BluethootChess.activity.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;

public class DidYouKnowThirdSlide extends Activity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.did_you_know3);
		
		/**
		 * Text View-ul care merge la slide-ul urmator.
		 */
		TextView goToSecondSlide = (TextView) findViewById(R.id.previousCuriosityThirdSlide);
        goToSecondSlide.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent myIntent = new Intent(view.getContext(), DidYouKnowSecondSlide.class);
                startActivity(myIntent);
                quitProcess();
            }

        });
	}
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if ((keyCode == KeyEvent.KEYCODE_BACK)) {
			Intent myIntent = new Intent(DidYouKnowThirdSlide.this,
					DidYouKnowSecondSlide.class);
			DidYouKnowThirdSlide.this.startActivity(myIntent);
			quitProcess();
		}

		return super.onKeyDown(keyCode, event);
	}

	private void quitProcess() {
		super.onDestroy();
		android.os.Process.killProcess(android.os.Process.myPid());
	}
}
